#include <iostream>
#include <map>
#include <vector>
#include <algorithm>

using namespace std;

int main(int argc, char const *argv[])
{
/*    map<string,  string>mymap;
    string str1 = "zhangsan";
    string str2 = "Can you help me?";
    mymap.insert(make_pair("name", str1));
    mymap.insert(make_pair("content", str2));
    //count在指定范围内查找与指定值匹配的所有元素
    auto mapIterator = mymap.find("name");
    if(mapIterator != mymap.end())
        cout << mapIterator->second << endl;*/

//count_if
/*    vector<int>myvector;
    for(size_t i = 0; i < 6; i++)
    {
        myvector.push_back(i);
    }
    for_each(myvector.begin(), myvector.end(), [](const int& Element){
        cout << Element << endl;
    });
    int counter = count_if(myvector.begin(), myvector.end(), [](const int& Element)-> bool {
        return (Element%3  == 0);
    });
    cout << counter << endl;*/

    //search find(容器中查找元素)
 /*   vector<string>Names = {"Adam", "Charles", "Collin", "Pobby"};
    vector<string>Names2 = {"Collin", "Pobby"};
    auto searchIterator = search(Names.begin(), Names.end(), Names2.begin(), Names2.end());
    if(searchIterator != Names.end())
    {
        //position
        cout << distance(Names.begin(), searchIterator) << endl();
    }*/
    //fill 将容器中的元素初始化为指定值
    vector<int>Interger1(6);
    fill(Interger1.begin(), Interger1.end(), 100);
    return 0;
}
